package com.mouliu.generate1;

import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.WorkHandler;
import com.mouliu.generate.Trade;

/**
 * @author mouliu
 * @create 2018-05-28-下午9:59
 */
public class Handler4 implements EventHandler<Trade>,WorkHandler<Trade> {
    @Override
    public void onEvent(Trade trade, long l, boolean b) throws Exception {
        this.onEvent(trade);
    }

    @Override
    public void onEvent(Trade trade) throws Exception {
        System.out.println("handler4：get name:"+trade.getName());
        trade.setName(trade.getName()+"h4");
    }
}
